import request from '@/utils/request'

// api地址
const api = {
  submit: 'clientApi/settlement/submit',
  prePay: 'clientApi/pay/prePay',
  getDoctorList: 'merchantApi/staff/getDoctorList',
  devicesave: 'merchantApi/device/save',//商户端-设备相关接口
  
}

// 结算台订单提交
export const submit = (targetId, selectNum, type, remark, payAmount, usePoint, couponId, cartIds, goodsId, skuId, buyNum, orderMode, payType,medicalDoctor,medicalService) => {
  return request.post(api.submit, { targetId, selectNum, type, remark, payAmount, usePoint, couponId, cartIds, goodsId, skuId, buyNum, orderMode, payType,medicalDoctor,medicalService})
}

// 支付前查询
export const prePay = (param) => {
  return request.get(api.prePay, param)
}

// 发起收款
export const doCashier = (param) => {
  return request.post(api.submit, param)
}
// 获取医生及操作员
export const getDoctorList = (param) => {
  return request.post(api.getDoctorList, param)
}
// 获取医生及操作员
export const devicesave = (param) => {
  return request.post(api.devicesave, param)
}

